package com.myapp.dao.impl;

import java.util.List;

import javax.ejb.Stateless;
import javax.persistence.Query;

import com.myapp.dao.PagoConceptoDao;
import com.myapp.entity.PagoConcepto;
import com.myapp.dao.impl.GeneralDaoImpl;

@Stateless
public class PagoConceptoDaoImpl extends GeneralDaoImpl<PagoConcepto, Long>
		implements PagoConceptoDao {


	@SuppressWarnings("unchecked")
	public List<PagoConcepto> consultarConceptosPago(Long idUnidad) {
		Query query = em.createNamedQuery("consultarConceptosUnidad");	
		query.setParameter("idUnidadh", idUnidad);
		List<PagoConcepto> listaConceptos = (List<PagoConcepto>)query.getResultList();
		if(listaConceptos!=null&&listaConceptos.size()>0){
			return listaConceptos;
		}
		return null;
	}

}
